package com.muc.ui;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.widget.ListView;

import com.muc.logic.IActivity;
import com.muc.logic.Task;
import com.muc.modle.MyAdapter;
import com.muc.modle.Status;
import com.muc.util.ConstTag;
import com.muc.yunbaobao.R;

public class FirstInNavActivity extends Activity implements IActivity, ConstTag
{
	List<Status>	st	= new ArrayList<Status>();	

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		// TODO Auto-generated method stub
	}
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.first_in_nav);
		init();
		ListView lView = (ListView) findViewById(R.id.listView1);
		MyAdapter myAdapter = new MyAdapter(this, st);
		lView.setAdapter(myAdapter);
	}
	@Override
	public void init()
	{
		// TODO Auto-generated method stub
		Status status = null;
		status = new Status(R.layout.nav_list_item_edit);
		status.addMyContent(STYLE_ImageView, R.id.imageView1, R.drawable.temp_pic);
		status.addMyContent(STYLE_TextView, R.id.textView1, "Try it	");
		status.addMyContent(STYLE_TextView, R.id.textView2, "do it");
		st.add(status);
		st.add(status);
		st.add(status);
		status = new Status(R.layout.nav_list_item_on_off);
		status.addMyContent(STYLE_ImageView, R.id.imageView1, R.drawable.temp_pic);
		status.addMyContent(STYLE_TextView, R.id.textView1, "Try it	");
		
		status.addMyContent(STYLE_ImageView, R.id.imageView2, R.drawable.nav_content_btn_off);
		st.add(status);
		st.add(status);
		st.add(status);
		// status = new Status(R.layout.nav_list_item_on_off);
		// status.addMyContent(STYLE_ImageView, R.id.imageView2,
		// R.drawable.nav_content_btn_off);
		// st.add(status);
		Log.d("Date", "List Status ready....prepare to show");
	}
	@Override
	public void refresh(Task task)
	{
		// TODO Auto-generated method stub
		switch (task.getTaskID())
		{
			case TASK_CHOOSE_PERIOD:
				break;
			default:
				break;
		}
	}
	@Override
	public void setListener()
	{
		// TODO Auto-generated method stub
	}
	@Override
	public void initListener()
	{
		// TODO Auto-generated method stub
	}
}
